package android.team.app.ui.missatoll;

import android.content.Intent;
import android.os.Bundle;
import android.team.app.R;
import android.team.app.ui.BaseActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.Spinner;

public class Trip_Info_Activity extends BaseActivity {

	private EditText edDate, edTotalAmoutDue;
	private Spinner spinnerRoad, spinnerEntryPoint, spinnerExitPoint;
	private ImageButton btCalendar, btAdd, btNext, btRemove;
	private LinearLayout lnFirst, lnSecond, lnThird, lnFourth, lnFiveth,
			lnSixth, lnSeventh;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.trip_info_activity);

		loadUI();
		loadSpecialUI();

		setTitleHeader(getString(R.string.tripinformation));					
		
	}

	private void loadSpecialUI() {

		btCalendar = (ImageButton) findViewById(R.id.btCalendar);
		btCalendar.setOnClickListener(this);
		btRemove = (ImageButton) findViewById(R.id.btRemove);
		btRemove.setOnClickListener(this);
		btAdd = (ImageButton) findViewById(R.id.btAdd);
		btAdd.setOnClickListener(this);
		btNext = (ImageButton) findViewById(R.id.btNext);
		btNext.setOnClickListener(this);

		lnFiveth = (LinearLayout) findViewById(R.id.lnFiveth);
		
	}
	
	//Xây dựng phương thức ẩn và hiện cho linearlayout
	private void setVisible(){
		lnFiveth.setVisibility(View.VISIBLE);
	}
	private void setInvisible(){
		lnFiveth.setVisibility(View.INVISIBLE);
	}

	@Override
	public void onClick(View v) {
		super.onClick(v);

		switch (v.getId()) {
		case R.id.btCalendar:

			break;

		case R.id.btRemove:
			
			setInvisible();
			
			break;
		case R.id.btAdd:
			
			setVisible();
			
			break;
		case R.id.btNext:
			startActivity(new Intent(Trip_Info_Activity.this, Payment_Activity.class));
			break;

		default:
			break;
		}

	}

}
